{extends file="../acp.html"}

{block name="title"}{$head_title}{/block}
{block name="content"}
<div class="t-n-s-top">
    <div class="t-month-con">
		<form method="POST" action="">
        <div class="t-con-list">
            <div class="formitems inline">  
                <label class="fi-name" style="width:60px;">请选择：</label>  
                <div class="form-controls" style="float:left;display:inline; margin-left:10px;">  
                    <select class="mini" name="year" id="year">  
                        <option value="2015" {if $year == 2015}selected{/if}>2015</option> 
                        <option value="2016" {if $year == 2016}selected{/if}>2016</option> 
                        <option value="2017" {if $year == 2017}selected{/if}>2017</option> 
                        <option value="2018" {if $year == 2018}selected{/if}>2018</option> 
                        <option value="2019" {if $year == 2019}selected{/if}>2019</option>  
                    </select>  
                    <span>年</span>  
                </div>  
				<div class="form-controls" style="float:left;display:inline; margin-left:10px;">  
                    <select class="mini" name="month" id="month">  
                        <option value="1" {if $month == 1}selected{/if}>1</option> 
                        <option value="2" {if $month == 2}selected{/if}>2</option>  
                        <option value="3" {if $month == 3}selected{/if}>3</option>  
                        <option value="4" {if $month == 4}selected{/if}>4</option>  
                        <option value="5" {if $month == 5}selected{/if}>5</option>  
                        <option value="6" {if $month == 6}selected{/if}>6</option>  
                        <option value="7" {if $month == 7}selected{/if}>7</option>  
                        <option value="8" {if $month == 8}selected{/if}>8</option>  
                        <option value="9" {if $month == 9}selected{/if}>9</option>  
                        <option value="10" {if $month == 10}selected{/if}>10</option>  
                        <option value="11" {if $month == 11}selected{/if}>11</option>  
                        <option value="12" {if $month == 12}selected{/if}>12</option>  
                    </select>  
                    <span>月</span>  
					<button type="submit" class="btn"><i class="gicon-search"></i>搜索</button>
                </div>  
            </div>  
        </div>
	</div>


	<div class="t-month-chart" id="month_container">
	</div>
</div>
{/block} 

{block name="js"}
<script type="text/javascript" src="/Public/Plugins/Highcharts/highcharts.js?version={$version}"></script>
<script src="/Public/Plugins/My97DatePicker/WdatePicker.js?version={$version}"></script>
<script type="text/javascript">
var order_amount_stat_list = '[';
var cost_amount_stat_list = '[';
var day_list = '[';
for (var i = 1; i <= {$day_num}; i ++)
{
	day_list = day_list + i + ',';
}
day_list = day_list.substring(0, day_list.length - 1);
day_list += ']';

{foreach from=$order_amount_stat_list key=key item=item}
	order_amount_stat_list = order_amount_stat_list + {$item} + ',';
{/foreach}
order_amount_stat_list = order_amount_stat_list.substring(0, order_amount_stat_list.length - 1);
order_amount_stat_list += ']';

var d = '{$date}';
{literal}
$(function (){
	/*$("#month_container").highcharts(
		{
		chart: { 
            defaultSeriesType: 'line', //图表类型line(折线图), 
            zoomType: 'x'   //x轴方向可以缩放 
        }, 
		"credits":{"text":"@\u542f\u535a\u8f6f\u4ef6","enabled":false,"href":"http:\/\/www.yurtree.com","position":{"align":"right","y":-10}},"legend":{"enabled":true,"layout":"vertical","align":"right","verticalAlign":"middle","borderWidth":0},"xAxis":{"categories":['00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24'],"title":{"text":"时间"}},"title":{"text":"订单交易量统计(" + 111 + "年)"},"yAxis":{"title":{"text":"交易量"},"allowDecimals":false,"plotLines":[{"value":0,"width":1,"color":"#808080"}],"min":0},"plotOptions":{"line":{"dataLabels":{"enabled":true},"enableMouseTracking":true}},"series":[{"type":"column","name":"交易量","data":eval(cost_amount_stat_list)}]}
	);*/
var chart = new Highcharts.Chart({
	chart: {
		renderTo: 'month_container',
		defaultSeriesType: 'line'
	},
	title: {
		text: d + ' 订单统计'
	},
	subtitle: {
		text: ''
	},
	xAxis: {
		categories: eval(day_list)
	},
	yAxis: {
		title: {
			text: 'RMB(元)'
		}
	},
	tooltip: {
		enabled: false,
		formatter: function() {
			return '<b>'+ this.series.name +'</b><br/>'+
				this.x +': '+ this.y +'°C';
		}
	},
	plotOptions: {
		line: {
			dataLabels: {
				enabled: true
			},
			enableMouseTracking: false
		}
	},
	series: [{
		name: '销售额',
		data: eval(order_amount_stat_list)
	}]
});
});
</script>
{/literal}
{/block} 

{block name="css"}
<link rel="stylesheet" href="/Public/Css/acp/AcpOrder/order_num_stat.css" type="text/css" />
{/block} 
